/* ===========================================================
 * $Id: IAuthorityService.java 446 2009-07-16 11:40:47Z bitorb $
 * This file is part of catalog
 * ===========================================================
 *
 * (C) Copyright 2009, by Gaixie.org and Contributors.
 * 
 * Project Info:  http://catalog.gaixie.org/
 *
 * catalog is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * catalog is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with catalog.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

package ro.ase.catalog.security.service;

import ro.ase.catalog.beans.Authority;
import ro.ase.catalog.security.SecurityException;

import java.util.List;


public interface IAuthorityService {


    public void add(Authority authority);
    

    public Integer findByNameVagueCount(String name);
    

    public List<Authority> findByNameVaguePerPage(String name, int start, int limit);
    

    public List<Authority> findAuthsByRoleIdPerPage(int roleId, int start, int limit);
    

    public Integer findAuthsByRoleIdCount(int roleId);
    

    public void bindAuths(int[] authIds, int roleId);
    

    public void unBindAuths(int[] authIds, int roleId);
    

    public void delete(int[] authIds) throws SecurityException ;
    

    public void update(Authority authority);
}
